import numpy as np

HARTREE_TO_KCAL_MOL = 627.5094738898777
EV_TO_KCAL_MOL = 23.060548012069496
BOHR_TO_ANGSTROM = 0.5291772105638411

fragment_info = {
    "ALA": ("AA", 0, 1),
    "ARG": ("RR", 1, 1),
    "ASP": ("DD", -1, 1),
    "CYS": ("CC", 0, 1),
    "GLN": ("QQ", 0, 1),
    "GLY": ("GG", 0, 1),
    "GLU": ("EE", -1, 1),
    "LYS": ("KK", 1, 1),
    "ASN": ("NN", 0, 1),
    "LEU": ("LL", 0, 1),
    "PRO": ("PP", 0, 1),
    "SER": ("SS", 0, 1),
    "THR": ("TT", 0, 1),
    "VAL": ("VV", 0, 1),
    "MET": ("MM", 0, 1),
    "HIS": ("HH", 1, 2),
    "HIE": ("HH", 0, 1),
    "HID": ("HID", 0, 1),
    "TRP": ("WW", 0, 1),
    "TYR": ("YY", 0, 1),
    "ILE": ("II", 0, 1),
    "PHE": ("FF", 0, 1),
    "ACENME": ("AN", 0, 1),
    "NME": ("AN", 0, 1),
    "AN": ("AN", 0, 1),
}

fragment_atomic_numbers = {
    "ALA": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 6, 1, 1, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
    "ARG": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 6, 1, 1, 6, 1, 1, 6, 1, 1, 7, 1, 6, 7, 1, 1, 7, 1, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
    "ASP": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 6, 1, 1, 6, 8, 8, 6, 8, 7, 1, 6, 1, 1, 1]),
    "CYS": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 6, 1, 1, 16, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
    "GLN": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 6, 1, 1, 6, 1, 1, 6, 8, 7, 1, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
    "GLY": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
    "GLU": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 6, 1, 1, 6, 1, 1, 6, 8, 8, 6, 8, 7, 1, 6, 1, 1, 1]),
    "LYS": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 6, 1, 1, 6, 1, 1, 6, 1, 1, 6, 1, 1, 7, 1, 1, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
    "ASN": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 6, 1, 1, 6, 8, 7, 1, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
    "LEU": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 6, 1, 1, 6, 1, 6, 1, 1, 1, 6, 1, 1, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
    "PRO": np.array([1, 6, 1, 1, 6, 8, 7, 6, 1, 1, 6, 1, 1, 6, 1, 1, 6, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
    "SER": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 6, 1, 1, 8, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
    "THR": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 6, 1, 6, 1, 1, 1, 8, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
    "VAL": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 6, 1, 6, 1, 1, 1, 6, 1, 1, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
    "MET": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 6, 1, 1, 6, 1, 1, 16, 6, 1, 1, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
    "HIS": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 6, 1, 1, 6, 7, 6, 1, 7, 1, 6, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
    "HIE": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 6, 1, 1, 6, 7, 6, 1, 7, 1, 6, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
    "HID": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 6, 1, 1, 6, 7, 6, 7, 1, 1, 6, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
    "TRP": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 6, 1, 1, 6, 6, 1, 7, 1, 6, 6, 1, 6, 1, 6, 1, 6, 1, 6, 6, 8, 7, 1, 6, 1, 1, 1]),
    "TYR": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 6, 1, 1, 6, 6, 1, 6, 1, 6, 8, 1, 6, 1, 6, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
    "ILE": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 6, 1, 6, 1, 1, 1, 6, 1, 1, 6, 1, 1, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
    "PHE": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 6, 1, 1, 6, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
    "ACENME": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
    "NME": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
    "AN": np.array([1, 6, 1, 1, 6, 8, 7, 1, 6, 1, 1, 1]),
}

fragment_atoms_str = {
    "ALA": "HCHHCONHCHCHHHCONHCHHH",
    "ARG": "HCHHCONHCHCHHCHHCHHNHCNHHNHHCONHCHHH",
    "ASP": "HCHHCONHCHCHHCOOCONHCHHH",
    "CYS": "HCHHCONHCHCHHSHCONHCHHH",
    "GLN": "HCHHCONHCHCHHCHHCONHHCONHCHHH",
    "GLY": "HCHHCONHCHHCONHCHHH",
    "GLU": "HCHHCONHCHCHHCHHCOOCONHCHHH",
    "LYS": "HCHHCONHCHCHHCHHCHHCHHNHHHCONHCHHH",
    "ASN": "HCHHCONHCHCHHCONHHCONHCHHH",
    "LEU": "HCHHCONHCHCHHCHCHHHCHHHCONHCHHH",
    "PRO": "HCHHCONCHHCHHCHHCHCONHCHHH",
    "SER": "HCHHCONHCHCHHOHCONHCHHH",
    "THR": "HCHHCONHCHCHCHHHOHCONHCHHH",
    "VAL": "HCHHCONHCHCHCHHHCHHHCONHCHHH",
    "MET": "HCHHCONHCHCHHCHHSCHHHCONHCHHH",
    "HIS": "HCHHCONHCHCHHCNCHNHCHCONHCHHH",
    "HIE": "HCHHCONHCHCHHCNCHNHCHCONHCHHH",
    "HID": "HCHHCONHCHCHHCNCNHHCHCONHCHHH",
    "TRP": "HCHHCONHCHCHHCCHNHCCHCHCHCHCCONHCHHH",
    "TYR": "HCHHCONHCHCHHCCHCHCOHCHCHCONHCHHH",
    "ILE": "HCHHCONHCHCHCHHHCHHCHHHCONHCHHH",
    "PHE": "HCHHCONHCHCHHCCHCHCHCHCHCONHCHHH",
    "ACENME": "HCHHCONHCHHH",
    "NME": "HCHHCONHCHHH",
    "AN": "HCHHCONHCHHH",
}

fragment_covalent_bonds = {
    "ALA": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8, 10, 10, 10, 14, 14, 16, 16, 18, 18, 18]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21]),
        np.array([1.09, 1.09, 1.09, 1.522, 1.229, 1.335,  1.01, 1.449, 1.09, 1.526, 1.522,
                  1.09, 1.09, 1.09, 1.229, 1.335,  1.01, 1.449,  1.09, 1.09,  1.09]),
    ),
    "ARG": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8, 10, 10, 10, 13, 13, 13, 16, 16, 16, 19, 19, 21, 21, 22, 22, 25, 25, 28, 28, 30, 30, 32, 32, 32]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 28, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 25, 23, 24, 26, 27, 29, 30, 31, 32, 33, 34, 35]),
        np.array([1.09, 1.09,  1.09, 1.522, 1.229, 1.335,  1.01, 1.449,  1.09, 1.526, 1.522,
                  1.09, 1.09, 1.526,  1.09,  1.09, 1.526,  1.09,  1.09, 1.463,  1.01,  1.34,
                  1.34, 1.34,  1.01,  1.01,  1.01,  1.01, 1.229, 1.335,  1.01, 1.449,  1.09,
                  1.09, 1.09]),
    ),
    "ASP": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8, 10, 10, 10, 13, 13, 16, 16, 18, 18, 20, 20, 20]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 16, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23]),
        np.array([1.09, 1.09,  1.09, 1.522, 1.229, 1.335,  1.01, 1.449,  1.09, 1.526, 1.522,
                  1.09, 1.09, 1.522,  1.25,  1.25, 1.229, 1.335,  1.01, 1.449,  1.09,  1.09,
                  1.09]),
    ),
    "CYS": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8, 10, 10, 10, 13, 15, 15, 17, 17, 19, 19, 19]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22]),
        np.array([1.09, 1.09, 1.09, 1.522, 1.229, 1.335, 1.01, 1.449, 1.09, 1.526, 1.522,
                  1.09, 1.09, 1.81, 1.336, 1.229, 1.335, 1.01, 1.449, 1.09,  1.09,  1.09]),
    ),
    "GLN": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8, 10, 10, 10, 13, 13, 13, 16, 16, 18, 18, 21, 21, 23, 23, 25, 25, 25]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 21, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28]),
        np.array([ 1.09, 1.09,  1.09, 1.522, 1.229, 1.335,  1.01, 1.449, 1.09, 1.526, 1.522,
                   1.09, 1.09, 1.526,  1.09,  1.09, 1.522, 1.229, 1.335, 1.01,  1.01, 1.229,
                  1.335, 1.01, 1.449,  1.09,  1.09,  1.09]),
    ),
    "GLY": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8, 11, 11, 13, 13, 15, 15, 15]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]),
        np.array([ 1.09,  1.09, 1.09, 1.522, 1.229, 1.335, 1.01, 1.449, 1.09, 1.09, 1.522,
                  1.229, 1.335, 1.01, 1.449,  1.09,  1.09, 1.09]),
    ),
    "GLU": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8, 10, 10, 10, 13, 13, 13, 16, 16, 19, 19, 21, 21, 23, 23, 23]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 19, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26]),
        np.array([ 1.09, 1.09,  1.09, 1.522, 1.229, 1.335, 1.01, 1.449,  1.09, 1.526, 1.522,
                   1.09, 1.09, 1.526,  1.09,  1.09, 1.522, 1.25,  1.25, 1.229, 1.335,  1.01,
                  1.449, 1.09,  1.09,  1.09]),
    ),
    "LYS": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8, 10, 10, 10, 13, 13, 13, 16, 16, 16, 19, 19, 19, 22, 22, 22, 26, 26, 28, 28, 30, 30, 30]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 26, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33]),
        np.array([ 1.09, 1.09,  1.09, 1.522, 1.229, 1.335, 1.01, 1.449,  1.09, 1.526, 1.522,
                   1.09, 1.09, 1.526,  1.09,  1.09, 1.526, 1.09,  1.09, 1.526,  1.09,  1.09,
                  1.471, 1.01,  1.01,  1.01, 1.229, 1.335, 1.01, 1.449,  1.09,  1.09,  1.09]),
    ),
    "ASN": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8, 10, 10, 10, 13, 13, 15, 15, 18, 18, 20, 20, 22, 22, 22]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 18, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25]),
        np.array([1.09, 1.09,  1.09, 1.522, 1.229, 1.335, 1.01, 1.449,  1.09, 1.526, 1.522,
                  1.09, 1.09, 1.522, 1.229, 1.335,  1.01, 1.01, 1.229, 1.335,  1.01, 1.449,
                  1.09, 1.09,  1.09]),
    ),
    "LEU": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8, 10, 10, 10, 13, 13, 13, 15, 15, 15, 19, 19, 19, 23, 23, 25, 25, 27, 27, 27]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 23, 11, 12, 13, 14, 15, 19, 16, 17, 18, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30]),
        np.array([1.09,  1.09,  1.09, 1.522, 1.229, 1.335, 1.01, 1.449, 1.09, 1.526, 1.522,
                  1.09,  1.09, 1.526,  1.09, 1.526, 1.526, 1.09,  1.09, 1.09,  1.09,  1.09,
                  1.09, 1.229, 1.335,  1.01, 1.449,  1.09, 1.09,  1.09]),
    ),
    "PRO": (
        np.array([0, 1, 1, 1, 4, 4, 6,  6, 7, 7,  7, 10, 10, 10, 13, 13, 13, 16, 16, 18, 18, 20, 20, 22, 22, 22]),
        np.array([1, 2, 3, 4, 5, 6, 7, 16, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]),
        np.array([1.09,  1.09, 1.09, 1.522, 1.229, 1.335, 1.449, 1.449,  1.09, 1.09, 1.526, 1.09,
                  1.09, 1.526, 1.09,  1.09, 1.526,  1.09, 1.522, 1.229, 1.335, 1.01, 1.449, 1.09,
                  1.09,  1.09]),
    ),
    "SER": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8, 10, 10, 10, 13, 15, 15, 17, 17, 19, 19, 19]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22]),
        np.array([1.09, 1.09, 1.09, 1.522, 1.229, 1.335, 1.01, 1.449, 1.09, 1.526, 1.522,
                  1.09, 1.09, 1.41,  0.96, 1.229, 1.335, 1.01, 1.449, 1.09,  1.09,  1.09]),
    ),
    "THR": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8, 10, 10, 10, 12, 12, 12, 16, 18, 18, 20, 20, 22, 22, 22]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 18, 11, 12, 16, 13, 14, 15, 17, 19, 20, 21, 22, 23, 24, 25]),
        np.array([1.09,  1.09, 1.09, 1.522, 1.229, 1.335, 1.01, 1.449,  1.09, 1.526, 1.522,
                  1.09, 1.526, 1.41,  1.09,  1.09,  1.09, 0.96, 1.229, 1.335,  1.01, 1.449,
                  1.09,  1.09, 1.09]),
    ),
    "VAL": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8, 10, 10, 10, 12, 12, 12, 16, 16, 16, 20, 20, 22, 22, 24, 24, 24]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 11, 12, 16, 13, 14, 15, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27]),
        np.array([1.09,  1.09,  1.09, 1.522, 1.229, 1.335, 1.01, 1.449, 1.09, 1.526, 1.522,
                  1.09, 1.526, 1.526,  1.09,  1.09,  1.09, 1.09,  1.09, 1.09, 1.229, 1.335,
                  1.01, 1.449,  1.09,  1.09,  1.09]),
    ),
    "MET": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8, 10, 10, 10, 13, 13, 13, 16, 17, 17, 17, 21, 21, 23, 23, 25, 25, 25]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 21, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28]),
        np.array([ 1.09, 1.09,  1.09, 1.522, 1.229, 1.335, 1.01, 1.449, 1.09, 1.526, 1.522,
                   1.09, 1.09, 1.526,  1.09,  1.09,  1.81, 1.81,  1.09, 1.09,  1.09, 1.229,
                  1.335, 1.01, 1.449,  1.09,  1.09,  1.09]),
    ),
    "HIS": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8, 10, 10, 10, 13, 13, 14, 15, 15, 17, 17, 19, 21, 21, 23, 23, 25, 25, 25]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 21, 11, 12, 13, 14, 19, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28]),
        np.array([ 1.09,  1.09,  1.09, 1.522, 1.229, 1.335, 1.01, 1.449, 1.09, 1.526, 1.522,
                   1.09,  1.09, 1.504, 1.394, 1.371, 1.335, 1.08, 1.343, 1.01, 1.381,  1.08,
                  1.229, 1.335,  1.01, 1.449,  1.09,  1.09, 1.09]),
    ),
    "HIE": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8, 10, 10, 10, 13, 13, 14, 15, 15, 17, 17, 19, 21, 21, 23, 23, 25, 25, 25]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 21, 11, 12, 13, 14, 19, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28]),
        np.array([ 1.09,  1.09,  1.09, 1.522, 1.229, 1.335, 1.01, 1.449, 1.09, 1.526, 1.522,
                   1.09,  1.09, 1.504, 1.394, 1.371, 1.335, 1.08, 1.343, 1.01, 1.381,  1.08,
                  1.229, 1.335,  1.01, 1.449,  1.09,  1.09, 1.09]),
    ),
    "HID": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8, 10, 10, 10, 13, 13, 14, 14, 16, 16, 18, 19, 21, 21, 23, 23, 25, 25, 25]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 21, 11, 12, 13, 14, 19, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28]),
        np.array([ 1.09,  1.09,  1.09, 1.522, 1.229, 1.335,  1.01, 1.449,  1.09, 1.526, 1.522,
                   1.09,  1.09, 1.504, 1.385, 1.375,  1.01, 1.343,  1.08, 1.335, 1.394,  1.08,
                  1.229, 1.335,  1.01, 1.449,  1.09,  1.09,  1.09]),
    ),
    "TRP": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8, 10, 10, 10, 13, 13, 14, 14, 16, 16, 18, 18, 19, 19, 21, 21, 23, 23, 25, 25, 28, 28, 30, 30, 32, 32, 32]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 28, 11, 12, 13, 14, 27, 15, 16, 17, 18, 19, 27, 20, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35]),
        np.array([ 1.09, 1.09,  1.09, 1.522, 1.229, 1.335,  1.01, 1.449,  1.09, 1.526, 1.522,
                   1.09, 1.09, 1.495, 1.352, 1.459,  1.08, 1.381,  1.01,  1.38,   1.4, 1.419,
                   1.08,  1.4,  1.08,   1.4,  1.08,   1.4,  1.08, 1.404, 1.229, 1.335,  1.01,
                  1.449, 1.09,  1.09,  1.09]),
    ),
    "TYR": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8, 10, 10, 10, 13, 13, 14, 14, 16, 16, 18, 18, 19, 21, 21, 23, 25, 25, 27, 27, 29, 29, 29]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 25, 11, 12, 13, 14, 23, 15, 16, 17, 18, 19, 21, 20, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32]),
        np.array([1.09, 1.09, 1.09, 1.522, 1.229, 1.335, 1.01, 1.449,  1.09, 1.526, 1.522,
                  1.09, 1.09, 1.51,   1.4,   1.4,  1.08,  1.4,  1.08, 1.409, 1.364, 1.409,
                  0.96, 1.08,  1.4,  1.08, 1.229, 1.335, 1.01, 1.449,  1.09,  1.09,  1.09]),
    ),
    "ILE": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8, 10, 10, 10, 12, 12, 12, 16, 16, 16, 19, 19, 19, 23, 23, 25, 25, 27, 27, 27]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 23, 11, 12, 16, 13, 14, 15, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30]),
        np.array([1.09,  1.09,  1.09, 1.522, 1.229, 1.335, 1.01, 1.449,  1.09, 1.526, 1.522,
                  1.09, 1.526, 1.526,  1.09,  1.09,  1.09, 1.09,  1.09, 1.526,  1.09,  1.09,
                  1.09, 1.229, 1.335,  1.01, 1.449,  1.09, 1.09,  1.09]),
    ),
    "PHE": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8, 10, 10, 10, 13, 13, 14, 14, 16, 16, 18, 18, 20, 20, 22, 24, 24, 26, 26, 28, 28, 28]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 24, 11, 12, 13, 14, 22, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31]),
        np.array([1.09, 1.09, 1.09, 1.522, 1.229, 1.335,  1.01, 1.449, 1.09, 1.526, 1.522,
                  1.09, 1.09, 1.51,   1.4,   1.4,  1.08,   1.4,  1.08,  1.4,  1.08,   1.4,
                  1.08,  1.4, 1.08, 1.229, 1.335,  1.01, 1.449,  1.09, 1.09,  1.09]),
    ),
    "ACENME": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]),
        np.array([1.09, 1.09, 1.09, 1.522, 1.229, 1.335, 1.01, 1.449, 1.09, 1.09, 1.09]),
    ),
    "NME": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]),
        np.array([1.09, 1.09, 1.09, 1.522, 1.229, 1.335, 1.01, 1.449, 1.09, 1.09, 1.09]),
    ),
    "AN": (
        np.array([0, 1, 1, 1, 4, 4, 6, 6, 8,  8,  8]),
        np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]),
        np.array([1.09, 1.09, 1.09, 1.522, 1.229, 1.335, 1.01, 1.449, 1.09, 1.09, 1.09]),
    ),
}

self_energies = {
    1: -0.496675195977,
    6: -37.760690035605,
    7: -54.566616171740,
    8: -75.031346432045,
    16: -398.0025913303,
}
